package com.george.order.loadbalance;

/**
 * @title: WeightServer.java
 * @description: 权重服务器
 * @author: George.Dong
 * @date: 2024/5/30 11:59
 */
public class WeightServer {

    /**
     * 服务器名称
     */
    private String name;
    /**
     * 服务器权重
     */
    private int weight;
    /**
     * 当前连接数
     */
    private int currentConnect = 0;

    public WeightServer(String name, int weight) {
        this.name = name;
        this.weight = weight;
    }

    public WeightServer(String name, int weight, int currentConnect) {
        this.name = name;
        this.weight = weight;
        this.currentConnect = currentConnect;
    }

    public String getName() {
        return name;
    }

    public int getWeight() {
        return weight;
    }

    public int getCurrentConnect() {
        return currentConnect;
    }
}
